package com.example.secondhandsysapi.Mapper;

import java.time.LocalDateTime;
import java.time.OffsetDateTime;

public class DateTimeExample {
    public static void main(String[] args) {
        // 假设你有一个从数据库检索到的OffsetDateTime对象  
        OffsetDateTime offsetDateTime = OffsetDateTime.parse("2024-04-03T04:00:00.000+00:00");

        // 转换为LocalDateTime，从而去除时区信息  
        LocalDateTime localDateTime = offsetDateTime.toLocalDateTime();

        System.out.println(localDateTime); // 输出: 2024-04-03T04:00:00  
    }
}
